package 构建者模式;

public class ComputerConcreteBuilder implements ComputerBuilder{
    Computer computer;

    public ComputerConcreteBuilder() {
        computer = new Computer();
    }

    public void buildCpu() {
        System.out.println("创建CPU");
        computer.setCpu("cpu");
    }

    public void buildMemory() {
        System.out.println("创建Memory");
        computer.setMemory("memory");
    }

    public void buildDisk() {
        System.out.println("创建Disk");
        computer.setDisk("Disk");
    }

    public Computer buildComputer() {
        return computer;
    }
}
